#!/usr/bin/make -f

%:
	dh $@

override_dh_shlibdeps:
	dh_shlibdeps --exclude=_binaryninja.so

override_dh_strip:
	strip \
	    debian/bindiff/opt/bindiff/bin/bindiff \
	    debian/bindiff/opt/bindiff/bin/binexport2dump \
	    debian/bindiff/opt/bindiff/libexec/bindiff_config_setup \
	    debian/bindiff/opt/bindiff/plugins/binaryninja/*.so \
	    debian/bindiff/opt/bindiff/plugins/idapro/*.so \
	    || true
	chrpath -d \
	    debian/bindiff/opt/bindiff/bin/bindiff \
	    debian/bindiff/opt/bindiff/bin/binexport2dump \
	    debian/bindiff/opt/bindiff/libexec/bindiff_config_setup \
	    debian/bindiff/opt/bindiff/plugins/binaryninja/*.so \
	    debian/bindiff/opt/bindiff/plugins/idapro/*.so \
	    || true

override_dh_fixperms:
	dh_fixperms
	chmod +x \
	    debian/bindiff/opt/bindiff/bin/bindiff \
	    debian/bindiff/opt/bindiff/bin/binexport2dump \
	    debian/bindiff/opt/bindiff/libexec/bindiff_config_setup \
	    && true
